'use strict';

var __importDefault =
    (this && this.__importDefault) ||
    function (mod) {
        return mod && mod.__esModule
            ? mod
            : {
                  default: mod
              };
    };

exports.__esModule = true;
/*
  两种网络请求：postRequest => POST, getRequest => GET
  请求头header: 默认json，支持自定义({})或快速写入('form', 'json')
*/

var request_1 = require('../../utils/request');

var globalData_1 = require('../../globalData');

var marketingRequest = new request_1['default']({
    ApiUrl: globalData_1['default'].marketingUrl
}); //查询付费会员列表

exports.getPayleMemberRuleList = function () {
    return marketingRequest.getRequest({
        url: 'app/payle/rule/list',
        isLoading: true
    });
}; // 付费会员购买记录

exports.getPayleMemberPurchaseRecord = function (params) {
    return marketingRequest.getRequest({
        url: 'app/payle/rule/user/order/list',
        data: params
    });
}; // 付费会员-权益领取记录

exports.getPayleMemberRaceRecord = function (params) {
    return marketingRequest.getRequest({
        url: 'app/payle/rule/user/race/list',
        data: params
    });
}; // 开通付费会员支付成功后调用

exports.openPayleMember = function (params) {
    return marketingRequest.postRequest({
        url: 'app/payle/rule/user/add/order/with/race',
        data: params
    });
};
